﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace test4
{
    public class Enemy
    {
        string id;
        int hp = 100;
        int lv = 1;
        //父类属性
        public string ID { set; get; }
        public int HP { set; get; }
        public int LV { set; get; }

        public Enemy(string n) //有参构造函数
        {
            ID = n;
        }

        public void Speak()//父类普通方法
        {
            Console.WriteLine("此路是我开，哪里走！");
        }

        public virtual void Attrack() //父类虚方法
        {
            Console.WriteLine("我发起了普通攻击");
        }
    }
}

